#pragma once
#include "ASN1Encodable.h"

namespace AppliedCryptography
{
	namespace AC = AppliedCryptography;

	class ASN1PrintableString : public ASN1Encodable
	{
	private:
		std::string _value;
		//int _unused; // number of unused bits

	protected:
		ASN1PrintableString(ClassBits classBits, ConstructedBit constucted, TypeNumberBits number);
		ASN1PrintableString(ClassBits classBits, ConstructedBit constucted, TypeNumberBits number, const char* value);
		ASN1PrintableString(ClassBits classBits, ConstructedBit constucted, TypeNumberBits number, const std::string& value);

	public:
		ASN1PrintableString();
		explicit ASN1PrintableString(const char* value);
		explicit ASN1PrintableString(const std::string& value);

	public:
		virtual ASN1PrintableString& set(const std::string& value);
		virtual ASN1PrintableString& set(const char* value);
		virtual ASN1PrintableString& operator=(const char* value);
		virtual ASN1PrintableString& operator=(const std::string& value);

	public:
		virtual std::string get() const;

	public:
		virtual std::vector<byte> getContentBits() const;

	public:
		static ASN1PrintableString getInstance(ASN1Encodable& obj);
	};
}; // namespace AppliedCryptography
